package auctionatr

class AccountInfoTagLib {
	def accountInfoHeader = {
		// check whether there is a session (boolean create - false) and whether a username exists in that session
		if(request.getSession(false) && session.username){
			out << "Eingeloggt als: ${session.username} "
			out << """[${link(action:"logout",
			controller:"user"){"Logout"}}]"""
		} else {
			out << """Sie sind derzeit nicht eingeloggt. [${link(action:"login",
			controller:"user"){"Login"}}]"""
		} }

}
